<template>
  <!-- app.vue是最大的组件，是其他所有组件的父组件，app里面有什么，用户就会看到什么 -->
  <div id="app">
    <!-- <img alt="Vue logo" src="./assets/logo.png">
    <HelloWorld msg="Welcome to Your Vue.js App"/> -->
    <!-- <v-big></v-big> -->
    <!-- <father></father> -->
    <!-- <mixin></mixin> -->
    <!-- 动态组件：通过修改is属性的值，控制对应组件的显示 -->
    <!-- keep-alive的作用是将之前的组件的状态缓存起来，方便下次使用，使用场景：经常切换显示的模块 -->
    <!-- <keep-alive>
      <div :is="comName"></div>
    </keep-alive>
    <span>请输入组件名：</span>
    <input type="text" v-model="name" @keyup.enter="change" /> -->
    <!-- 引入通讯录的index组件，这是父组件 -->
    <index></index>
  </div>
</template>

<script>
// import HelloWorld from "./components/HelloWorld.vue";
// import vBig from "./components/big.vue";
// import father from "./components/father.vue";
// import mixin from "./components/mixin.vue";
// import login from "./components/login.vue";
// import register from "./components/register.vue";
// import myMixin from './utils/mixin'
// 引入通讯录的index组件，这是父组件
import index from './components/contact/index.vue'
export default {
  // mixins: [myMixin],
  name: "App",
  data() {
    return {
      comName: "HelloWorld",
      name: "HelloWorld",
    };
  },
  components: {
    // HelloWorld: HelloWorld,
    // vBig: vBig,
    // father: father,
    // mixin: mixin,
    // register: register,
    // login: login,
    index: index
  },
  methods: {
    change() {
      this.comName = this.name;
    },
  },
};
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
